package indzcraft.loader;

public class Enchant{
	private String name = "";
	private String slotName = "";
	
	private int str = 0;
	private int agi = 0;
	private int ap = 0;
	private int crit = 0;
	private int mastery = 0;
	private int exp = 0;
	private int hit = 0;
	private int haste = 0;
	
	private boolean enchanterOnly = false;
	private boolean leatherworkerOnly = false;
	private boolean inscripterOnly = false;
	private boolean tailorOnly = false;
	private double ep;
	
	public Enchant(String n,String sn){
		this.name = n;
		this.slotName = sn;
	}
	
	public Enchant(String n,String sn,int str,int agi, int ap, int crit, int exp, int haste, int hit, int mastery) {
		this.name = n;
		this.setSlotName(sn);
		this.str = str;
		this.agi = agi;
		this.ap = ap;
		this.crit = crit;
		this.exp = exp;
		this.haste = haste;
		this.hit = hit;
		this.mastery = mastery;
	}
	public int getAp() {
		return ap;
	}
	public int getCrit() {
		return crit;
	}
	public int getMastery() {
		return mastery;
	}
	public int getExp() {
		return exp;
	}
	public int getStr() {
		return str;
	}
	public int getAgi(){
		return agi;
	}
	public int getHit(){
		return hit;
	}
	public int getHaste(){
		return haste;
	}
	public String getName(){
		return name;
	}

	public void setSlotName(String slotName) {
		this.slotName = slotName;
	}

	public String getSlotName() {
		return slotName;
	}
	
	public void setEnchanterOnly(boolean b){
		enchanterOnly = b;
	}
	
	public boolean isEnchanterOnly(){
		return enchanterOnly;
	}
	
	public void setLeatherworkerOnly(boolean b){
		leatherworkerOnly = b;
	}
	
	public boolean isLeatherworkerOnly(){
		return leatherworkerOnly;
	}
	
	public void setEP(double ep) {
		this.ep = ep;
	}

	public double getEP() {
		return ep;
	}
	
	public String toString(){
		String ret = "";
		if(str > 0)
			ret += str + " Str ";
		if(agi > 0)
			ret += agi + " Agi ";
		if(ap > 0)
			ret += ap + " Ap ";
		if(crit > 0)
			ret += crit + " Crit ";
		if(exp > 0)
			ret += exp + " Exp ";
		if(haste > 0)
			ret += haste + " Haste ";
		if(hit > 0)
			ret += hit + " Hit ";
		if(mastery > 0)
			ret += mastery + " Mastery ";
		return ret;
	}

	public boolean isInscripterOnly() {
		return inscripterOnly;
	}

	public void setInscripterOnly(boolean inscripterOnly) {
		this.inscripterOnly = inscripterOnly;
	}

	public boolean isTailorOnly() {
		return tailorOnly;
	}

	public void setTailorOnly(boolean tailorOnly) {
		this.tailorOnly = tailorOnly;
	}
}